/**
 * @projectName practise
 * @package com.wzl.base.domain
 * @className com.wzl.base.StudyDemo05Package
 * @copyright Copyright 2020 Thunisoft, Inc All rights reserved.
 */
package com.wzl.base;

/**
 * StudyDemo05Package
 * @description java常用包学习
 * @author weiZhiLin
 * @date 2020/12/15 17:59
 * @version 1.0
 */
public class StudyDemo05Package {
    public static void main(String[] args) {
//        testMathAbs();
//        testStringJoin();
    }

    // 测试字符串拼接
    private static void testStringJoin() {
        String[] str = new String[]{"123", "343"};
        String join = String.join("!!!", str);
        System.out.println(join);
    }

    // 测试绝对值
    private static void testMathAbs() {
        float a = -1.23f;
        int b = (int) -1.23;
        float abs = Math.abs(a);
        float abs2 = Math.abs(b);
        System.out.println(abs); // 1.23
        System.out.println(b); // -1
        System.out.println(abs2); // 1.0
    }
}
